#include <stdio.h>
#include <unistd.h>

int main(){
	pid_t pid;	
	pid = fork();
	if (pid == 0){
		// child	
		if (execlp("/bin/ls", "/bin/ls", "-l", ".") == -1){
			perror("execlp error");
			return 0;
		}
		printf("child over!\n");
	}else if(pid > 0){
		printf("parent over!\n");
		sleep(1);
	}else{
		perror("fork error");
	}
	return 0;
}
